package com.eshop.eshop2021_v1.controller.before;

import com.eshop.eshop2021_v1.common.JsonResult;
import com.eshop.eshop2021_v1.service.FocusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * @author: 若若叶
 * @date: 2021/10/12 10:28 FileName: FocusController Description:
 */
@Controller
@RequestMapping("/focus")
public class FocusController {
  @Autowired FocusService focusService;
  // 加入收藏
  @PostMapping("/isFocus")
  @ResponseBody
  public JsonResult isFocus(Integer goodId, HttpSession session) {
    return focusService.addFocus(goodId, session);
  }
}
